<?php

namespace JsonLowCode\UI;

use JsonLowCode\Schema;
use JsonLowCode\Traits\Models\HasModeShow;

/**
 * CollapseTransition 组件
 * @method static CollapseTransition make(mixed $children = null) CollapseTransition 组件
 */
class CollapseTransition extends Schema
{
    protected string $componentName = "NCollapseTransition";

    use HasModeShow;

    /**
     * @param mixed|null $children
     */
    public function __construct(mixed $children = null)
    {
        parent::__construct();
        $this->children($children);
    }

    /**
     * 是否在首次出现时播放动画
     * @param string|bool $bool 是否是js表达式
     * @return $this
     */
    public function appear(string|bool $bool = true): static
    {
        return $this->slot('appear', $bool);
    }
}
